Knowledge = {
    toogleCate: function() {
        var boxCate = $("#forwarding_cate");
        if (boxCate.css("display") === "none") {
            boxCate.css("display", "block");
        }
        else {
            $("#hidCateId").val('');
            Knowledge.closeCate(" Chọn chuyên mục");
        }
    },
    closeCate: function(val) {
        var boxCate = $("#forwarding_cate");
        boxCate.css("display", "none");
        $("#txtCate").val(" " + val);
    },
    selectCate: function(id, name) {
        $("#hidCateId").val(id);
        Knowledge.closeCate(name);
    },
    search: function() {
        var cate_id = $("#hidCateId").val() !== "" ? $("#hidCateId").val() : 0;
        window.location.href = "/kien-thuc-xnk/tim-kiem/1?txtSearch=" + $("#txtSearch").val() + "&cateId=" + cate_id + "&cateName=" + $("#txtCate").val();
    }
}